package com.dnui.seven2.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName buycrowdfunding
 */
@Data
public class Buycrowdfunding implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 
     */
    private Long crowdfundingId;

    /**
     * 
     */
    private Long userId;

    /**
     * 
     */
    private LocalDateTime buycrowdfundingTime;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private Integer crowdfundingNumber;

    /**
     * 
     */
    private String crowdfundingImage;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Buycrowdfunding other = (Buycrowdfunding) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCrowdfundingId() == null ? other.getCrowdfundingId() == null : this.getCrowdfundingId().equals(other.getCrowdfundingId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getBuycrowdfundingTime() == null ? other.getBuycrowdfundingTime() == null : this.getBuycrowdfundingTime().equals(other.getBuycrowdfundingTime()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCrowdfundingNumber() == null ? other.getCrowdfundingNumber() == null : this.getCrowdfundingNumber().equals(other.getCrowdfundingNumber()))
            && (this.getCrowdfundingImage() == null ? other.getCrowdfundingImage() == null : this.getCrowdfundingImage().equals(other.getCrowdfundingImage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCrowdfundingId() == null) ? 0 : getCrowdfundingId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getBuycrowdfundingTime() == null) ? 0 : getBuycrowdfundingTime().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCrowdfundingNumber() == null) ? 0 : getCrowdfundingNumber().hashCode());
        result = prime * result + ((getCrowdfundingImage() == null) ? 0 : getCrowdfundingImage().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", crowdfundingId=").append(crowdfundingId);
        sb.append(", userId=").append(userId);
        sb.append(", buycrowdfundingTime=").append(buycrowdfundingTime);
        sb.append(", name=").append(name);
        sb.append(", crowdfundingNumber=").append(crowdfundingNumber);
        sb.append(", crowdfundingImage=").append(crowdfundingImage);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}